﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    主页
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%: ViewData["Message"] %></h2>
    <p>
        若要了解有关 ASP.NET MVC 的更多信息，请访问 <a href="http://asp.net/mvc" title="ASP.NET MVC 网站">http://asp.net/mvc</a>。
    </p>
    <%using (Html.BeginForm())
      { %>
    分类：
    <%=Html.ActionLink("同步导学", "Index", new { keyword = Request.QueryString["keyword"], categoryName = "同步导学", gid = Request.QueryString["gid"], sid = Request.QueryString["sid"] })%>
    <%=Html.ActionLink("同步精讲", "Index", new { keyword = Request.QueryString["keyword"], categoryName = "同步精讲", gid = Request.QueryString["gid"], sid = Request.QueryString["sid"] })%>
    <%=Html.ActionLink("名师课程", "Index", new { keyword = Request.QueryString["keyword"], categoryName = "名师课程", gid = Request.QueryString["gid"], sid = Request.QueryString["sid"] })%>
    <hr />
    年级：<%=Html.ActionLink("一年级", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = "一年级", sid = Request.QueryString["sid"] })%>
    <%=Html.ActionLink("二年级", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = "二年级", sid = Request.QueryString["sid"] })%>
        <%=Html.ActionLink("三年级", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = "三年级", sid = Request.QueryString["sid"] })%>

    <hr />
    科目：
    <%=Html.ActionLink("数学", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = "数学" })%>
    <%=Html.ActionLink("语文", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = "语文" })%>
    <hr />
价格：

    <%=Html.ActionLink("1-99", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = Request.QueryString["sid"], minPrice = 1, maxPrice = 99 })%>
        <%=Html.ActionLink("100-199", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = Request.QueryString["sid"], minPrice = 100, maxPrice =199 })%>
             <%=Html.ActionLink("200-299", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = Request.QueryString["sid"], minPrice = 200, maxPrice =299 })%>
             <%=Html.ActionLink("300元以上", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = Request.QueryString["sid"], minPrice = 300 })%>
     <input type="text" name="minprice" />至<input type="text" name="maxprice" />元<input
         type="submit" value="确定" />
    <hr />
    关键字:<%=Html.TextBox("keyword")%><input type="submit" value="检索" /><hr />
    <%=Html.TextBox("categoryName",Request.QueryString["categoryName"])%>
    <%=Html.TextBox("gid", Request.QueryString["gid"])%>
    <%=Html.TextBox("sid", Request.QueryString["sid"])%>

    
    <%=Html.ActionLink("按更新时间排序", "index", new { sortby=0})%>
    <%=Html.ActionLink("按价格上升", "index", new { sortby = 2 })%>
    <%=Html.ActionLink("安价格下降", "index", new { sortby = 1 })%>
    
    
    <%foreach (var i in (ViewData["result"] as CommonSearchModule.SearchResult).Result)
      {
    %><div style="margin: 5px;border:1px solid #000">
        课程ID:<%=i.ID%><br />
        课程名称:<%=i.Name%><br />
        分类:<%=i.CategoryName%><br />
        年级科目：<%=i.PropertyName %><br />
        发布时间：<%=i.PackageTime %><br />
        价格:<%=i.Price%><br />
        Info:<%=i.Info%>
    </div>
     <%
      } %>
    <%=ViewData["page"] %>
    <%} %>
</asp:Content>
